﻿namespace ARchGL.Platform.Authorization
{
    /// <summary>
    /// Defines string constants for application's permission names.
    /// <see cref="AppAuthorizationProvider"/> for permission definitions.
    /// </summary>
    public static class AppPermissions
    {
        #region 系统现有权限

        //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)

        public const string Pages = "Pages";

        public const string Pages_DemoUiComponents = "Pages.DemoUiComponents";
        public const string Pages_Administration = "Pages.Administration";

        public const string Pages_Administration_Roles = "Pages.Administration.Roles";
        public const string Pages_Administration_Roles_Create = "Pages.Administration.Roles.Create";
        public const string Pages_Administration_Roles_Edit = "Pages.Administration.Roles.Edit";
        public const string Pages_Administration_Roles_Delete = "Pages.Administration.Roles.Delete";

        public const string Pages_Administration_Users = "Pages.Administration.Users";
        public const string Pages_Administration_Users_Create = "Pages.Administration.Users.Create";
        public const string Pages_Administration_Users_Edit = "Pages.Administration.Users.Edit";
        public const string Pages_Administration_Users_Delete = "Pages.Administration.Users.Delete";
        public const string Pages_Administration_Users_ChangePermissions = "Pages.Administration.Users.ChangePermissions";
        public const string Pages_Administration_Users_Impersonation = "Pages.Administration.Users.Impersonation";

        public const string Pages_Administration_Languages = "Pages.Administration.Languages";
        public const string Pages_Administration_Languages_Create = "Pages.Administration.Languages.Create";
        public const string Pages_Administration_Languages_Edit = "Pages.Administration.Languages.Edit";
        public const string Pages_Administration_Languages_Delete = "Pages.Administration.Languages.Delete";
        public const string Pages_Administration_Languages_ChangeTexts = "Pages.Administration.Languages.ChangeTexts";

        public const string Pages_Administration_AuditLogs = "Pages.Administration.AuditLogs";

        public const string Pages_Administration_OrganizationUnits = "Pages.Administration.OrganizationUnits";
        public const string Pages_Administration_OrganizationUnits_ManageOrganizationTree = "Pages.Administration.OrganizationUnits.ManageOrganizationTree";
        public const string Pages_Administration_OrganizationUnits_ManageMembers = "Pages.Administration.OrganizationUnits.ManageMembers";

        public const string Pages_Administration_HangfireDashboard = "Pages.Administration.HangfireDashboard";

        public const string Pages_Administration_UiCustomization = "Pages.Administration.UiCustomization";

        //TENANT-SPECIFIC PERMISSIONS

        public const string Pages_Tenant_Dashboard = "Pages.Tenant.Dashboard";

        public const string Pages_Administration_Tenant_Settings = "Pages.Administration.Tenant.Settings";

        public const string Pages_Administration_Tenant_SubscriptionManagement = "Pages.Administration.Tenant.SubscriptionManagement";

        //HOST-SPECIFIC PERMISSIONS

        public const string Pages_Editions = "Pages.Editions";
        public const string Pages_Editions_Create = "Pages.Editions.Create";
        public const string Pages_Editions_Edit = "Pages.Editions.Edit";
        public const string Pages_Editions_Delete = "Pages.Editions.Delete";

        public const string Pages_Tenants = "Pages.Tenants";
        public const string Pages_Tenants_Create = "Pages.Tenants.Create";
        public const string Pages_Tenants_Edit = "Pages.Tenants.Edit";
        public const string Pages_Tenants_ChangeFeatures = "Pages.Tenants.ChangeFeatures";
        public const string Pages_Tenants_Delete = "Pages.Tenants.Delete";
        public const string Pages_Tenants_Impersonation = "Pages.Tenants.Impersonation";

        public const string Pages_Administration_Host_Maintenance = "Pages.Administration.Host.Maintenance";
        public const string Pages_Administration_Host_Settings = "Pages.Administration.Host.Settings";
        public const string Pages_Administration_Host_Dashboard = "Pages.Administration.Host.Dashboard";

        #endregion

        #region 自定义权限

        public const string APJ = "APJ";

        //系统管理
        public const string APJ_System = APJ + ".System";
        public const string APJ_System_Role = APJ_System + ".Role"; //角色管理
        public const string APJ_System_User = APJ_System + ".User"; //人员管理
        public const string APJ_System_Organizations = APJ_System + ".Organizations"; //部门管理
        public const string APJ_System_Notices = APJ_System + ".Notices"; //发布公告
        public const string APJ_System_Logs = APJ_System + ".Logs"; //系统日志

        //项目管理
        public const string APJ_Project = APJ + ".Project";
        public const string APJ_Project_Manage = APJ_Project + ".Manage"; //项目管理
        public const string APJ_Project_Check = APJ_Project + ".Check"; //发起巡检

        //企业资料库管理
        public const string APJ_Organizations_DocumentLibrarys = APJ + ".Organizations_DocumentLibrarys";
        public const string APJ_Organizations_DocumentLibrarys_Up = APJ_Organizations_DocumentLibrarys + ".Up"; //上传文件
        public const string APJ_Organizations_DocumentLibrarys_NewFolder = APJ_Organizations_DocumentLibrarys + ".NewFolder"; //新建文件夹
        public const string APJ_Organizations_DocumentLibrarys_Edit = APJ_Organizations_DocumentLibrarys + ".Edit"; //编辑文件
        public const string APJ_Organizations_DocumentLibrarys_Delete = APJ_Organizations_DocumentLibrarys + ".Delete"; //删除文件
        public const string APJ_Organizations_DocumentLibrarys_Move = APJ_Organizations_DocumentLibrarys + ".Move"; //移动文件

        //项目内部权限管理
        public const string APJ_PI = APJ + ".PI"; //ProjectInternal
        public const string APJ_PI_Models = APJ_PI + ".Models"; //模型管理
        public const string APJ_PI_Drawings = APJ_PI + ".Drawings"; //图纸管理
        public const string APJ_PI_Up = APJ_PI + ".Up"; //上传文件
        public const string APJ_PI_NewFolder = APJ_PI + ".NewFolder"; //新建文件夹
        public const string APJ_PI_Edit = APJ_PI + ".Edit"; //编辑所有文件
        public const string APJ_PI_Delete = APJ_PI + ".Delete"; //删除文件
        public const string APJ_PI_Move = APJ_PI + ".Move"; //移动文件
        public const string APJ_PI_View = APJ_PI + ".View"; //查看记录
        public const string APJ_PI_CheckItems = APJ_PI + ".CheckItems"; //检查项/检查性质
        public const string APJ_PI_CreateSelf = APJ_PI + ".CreateSelf"; //发起自检
        public const string APJ_PI_ViewSelf = APJ_PI + ".ViewSelf"; //查看自检
        public const string APJ_PI_ProjectUser = APJ_PI + ".ProjectUser"; //项目成员管理
        public const string APJ_PI_Logs = APJ_PI + ".Logs"; //查看项目日志

        #region 建委开放接口访问权限

        public const string AMJ = "AMJ";
        public const string AMJ_Jianwei = AMJ + ".Jianwei"; //接口访问

        #endregion

        #endregion
    }
}
